<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = [1, 2, 3, 4];
        var sum = 0;
        arr.forEach(function(value, index, array) {
            sum += value;
        })
        console.log(sum);
        var newArr = arr.filter(function(value, index) {
            return value >= 3;
        })
        console.log(newArr);
        var arr1 = arr.some(function(value) {
            return value > 1;
        })
        console.log(arr1);
    </script>
</head>

<body>

</body>

</html>